package fun.chutianshu.eescore_09_shiro1.mappers;


import fun.chutianshu.eescore_09_shiro1.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    //根据姓名找用户
    @Select("SELECT * FROM Role WHERE role_name = #{role_name}")
    Role findByName(@Param("role_name") String role_name);

    //所有用户
    @Select("select * from Role")
    List<Role> getAll();
}
